//-----------------------------------------------------
// Design Name : Program Counter v 1.0.0
// File Name   : PC.v
// Function    : Program Counter
//-----------------------------------------------------
// This version of the program counter is nothing
// more than a register that latches on the data.
// It depends on an ALU to give it the correct next
// address.
//-----------------------------------------------------

module PC (
	input [15:0] inputAddress,
	output reg [15:0] outputAddress = 16'd0,
	input PCenable,
	input reset,
	input clk
); 

// Implementation
always @ (posedge clk)
begin
	if(reset == 1)
		outputAddress <= 16'h0000;
	else if(PCenable)
		outputAddress <= inputAddress;
	end 

endmodule 